package com.lzm.ydpt.entity.mall;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class ProductBean implements Parcelable {

    private long goods_id;
    private long store_id;
    private String store_name;
    private String image_src;
    private String store_image_src;
    private String video_src;
    private String title;
    private String functional_indications;
    private String content;
    private int sales_volume;// 销量
    private String min_price;
    private String max_price;
    private int max_purchase_gold;
    private int min_purchase_gold;
    private String min_market_price;
    private String max_market_price;
    private int min_gold;
    private int max_gold;
    private List<String> banner_images_src = new ArrayList<>();
    private boolean isSelect;
    private int count;// 购物车选中的数量
    private int collection_flag;// 是否收藏 0：未收藏，1：收藏
    private int range_flag;// 是否在服务范围内 1：在，0：不在
    private int inventory;
    private int gift_flag;//是否礼品 1是，2否

    public ProductBean() {
    }

    protected ProductBean(Parcel in) {
        goods_id = in.readLong();
        store_id = in.readLong();
        store_name = in.readString();
        image_src = in.readString();
        store_image_src = in.readString();
        video_src = in.readString();
        title = in.readString();
        functional_indications = in.readString();
        content = in.readString();
        sales_volume = in.readInt();
        min_price = in.readString();
        max_price = in.readString();
        max_purchase_gold = in.readInt();
        min_purchase_gold = in.readInt();
        min_market_price = in.readString();
        max_market_price = in.readString();
        min_gold = in.readInt();
        max_gold = in.readInt();
        banner_images_src = in.createStringArrayList();
        isSelect = in.readByte() != 0;
        count = in.readInt();
        collection_flag = in.readInt();
        range_flag = in.readInt();
        inventory = in.readInt();
        gift_flag = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(goods_id);
        dest.writeLong(store_id);
        dest.writeString(store_name);
        dest.writeString(image_src);
        dest.writeString(store_image_src);
        dest.writeString(video_src);
        dest.writeString(title);
        dest.writeString(functional_indications);
        dest.writeString(content);
        dest.writeInt(sales_volume);
        dest.writeString(min_price);
        dest.writeString(max_price);
        dest.writeInt(max_purchase_gold);
        dest.writeInt(min_purchase_gold);
        dest.writeString(min_market_price);
        dest.writeString(max_market_price);
        dest.writeInt(min_gold);
        dest.writeInt(max_gold);
        dest.writeStringList(banner_images_src);
        dest.writeByte((byte) (isSelect ? 1 : 0));
        dest.writeInt(count);
        dest.writeInt(collection_flag);
        dest.writeInt(range_flag);
        dest.writeInt(inventory);
        dest.writeInt(gift_flag);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<ProductBean> CREATOR = new Creator<ProductBean>() {
        @Override
        public ProductBean createFromParcel(Parcel in) {
            return new ProductBean(in);
        }

        @Override
        public ProductBean[] newArray(int size) {
            return new ProductBean[size];
        }
    };

    public long getGoods_id() {
        return goods_id;
    }

    public void setGoods_id(long goods_id) {
        this.goods_id = goods_id;
    }

    public long getStore_id() {
        return store_id;
    }

    public void setStore_id(long store_id) {
        this.store_id = store_id;
    }

    public String getStore_name() {
        return store_name;
    }

    public void setStore_name(String store_name) {
        this.store_name = store_name;
    }

    public String getImage_src() {
        return image_src;
    }

    public void setImage_src(String image_src) {
        this.image_src = image_src;
    }

    public String getStore_image_src() {
        return store_image_src;
    }

    public void setStore_image_src(String store_image_src) {
        this.store_image_src = store_image_src;
    }

    public String getVideo_src() {
        return video_src;
    }

    public void setVideo_src(String video_src) {
        this.video_src = video_src;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getFunctional_indications() {
        return functional_indications;
    }

    public void setFunctional_indications(String functional_indications) {
        this.functional_indications = functional_indications;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getSales_volume() {
        return sales_volume;
    }

    public void setSales_volume(int sales_volume) {
        this.sales_volume = sales_volume;
    }

    public String getMin_price() {
        return min_price;
    }

    public void setMin_price(String min_price) {
        this.min_price = min_price;
    }

    public String getMax_price() {
        return max_price;
    }

    public void setMax_price(String max_price) {
        this.max_price = max_price;
    }

    public int getMax_purchase_gold() {
        return max_purchase_gold;
    }

    public void setMax_purchase_gold(int max_purchase_gold) {
        this.max_purchase_gold = max_purchase_gold;
    }

    public int getMin_purchase_gold() {
        return min_purchase_gold;
    }

    public void setMin_purchase_gold(int min_purchase_gold) {
        this.min_purchase_gold = min_purchase_gold;
    }

    public String getMin_market_price() {
        return min_market_price;
    }

    public void setMin_market_price(String min_market_price) {
        this.min_market_price = min_market_price;
    }

    public String getMax_market_price() {
        return max_market_price;
    }

    public void setMax_market_price(String max_market_price) {
        this.max_market_price = max_market_price;
    }

    public int getMin_gold() {
        return min_gold;
    }

    public void setMin_gold(int min_gold) {
        this.min_gold = min_gold;
    }

    public int getMax_gold() {
        return max_gold;
    }

    public void setMax_gold(int max_gold) {
        this.max_gold = max_gold;
    }

    public List<String> getBanner_images_src() {
        return banner_images_src;
    }

    public void setBanner_images_src(List<String> banner_images_src) {
        this.banner_images_src = banner_images_src;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getCollection_flag() {
        return collection_flag;
    }

    public void setCollection_flag(int collection_flag) {
        this.collection_flag = collection_flag;
    }

    public int getRange_flag() {
        return range_flag;
    }

    public void setRange_flag(int range_flag) {
        this.range_flag = range_flag;
    }

    public int getInventory() {
        return inventory;
    }

    public void setInventory(int inventory) {
        this.inventory = inventory;
    }

    public int getGift_flag() {
        return gift_flag;
    }

    public void setGift_flag(int gift_flag) {
        this.gift_flag = gift_flag;
    }
}